package com.gr100.biz.app.res;

import biz.yfsoft.api.ae.api.AEClient;
import biz.yfsoft.api.ae.api.AEParam;
import biz.yfsoft.api.ae.api.AERspType;



/**
 * Created by CoderA on 2016/8/5.
 */
public class SyncService {

    static int counter = 0;

    public static synchronized String syncFunction(String method,String paramStr){

            System.out.println(method);
            System.out.println(paramStr);
//
            AEClient _client = new AEClient(method,new AEParam().setJsonStr(paramStr));

            AERspType result = _client.call();

//            try {
//                Thread.sleep(1 * 10000);
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }
            counter++;
            System.out.println(counter);
            return result.toString();


    }
}
